package nciae.db.service;

import com.baomidou.mybatisplus.extension.service.IService;
import nciae.db.common.CommonResult;
import nciae.db.pojo.dto.ApiIsSubmitHomeWorkDTO;
import nciae.db.pojo.entity.HomeworkDetail;
import nciae.db.pojo.vo.HomeworkDetailVo;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface HomeworkDetailService extends IService<HomeworkDetail> {
    public CommonResult<List<HomeworkDetailVo>> search(Integer page , Integer size, String student , Integer select, String homeworkType,String expertId);
    public HomeworkDetailVo getHomeworkDetail(Integer id);
    public CommonResult<String> homeworkDetailSave(HomeworkDetailVo homeworkDetailVo);

    public CommonResult<Boolean> apiIsSubmitHomeWork(ApiIsSubmitHomeWorkDTO apiIsSubmitHomeWorkDTO);

    CommonResult<String> UploadHomeWorkFiles(MultipartFile file, Long studentId, Long homeWorkId) throws IOException;

    ResponseEntity<Resource> downloadFiles(Integer id);
}
